const logger = require('../console-logger')
// 
module.exports = class Client {
    constructor(config) {
        this.clientId = config.id
        this.clientName = config.name
    }

    info() {
        console.log('clientId:%s,clientName:%s,clientType:%s', this.clientId, this.clientName, this.clientType)
    }

    // client api method
    async getSetting() {
        logger.warn(`${this.clientType}:getSetting,未实现的方法`)
    }

    async addTorrent(torrent, options) {
        logger.warn(`${this.clientType}:addTorrent,未实现的方法`)
    } 
    
    async addMagnet(torrent, options) {
        logger.warn(`${this.clientType}:addMagnet,未实现的方法`)
    }
    async removeTorrent(ids, removeData) {
        logger.warn(`${this.clientType}:removeTorrent,未实现的方法`)
    }
    async startTorrent(ids) {
        logger.warn(`${this.clientType}:startTorrent,未实现的方法`)
    }
    async stopTorrent(ids) {
        logger.warn(`${this.clientType}:stopTorrent,未实现的方法`)
    }
    async verifyTorrent(ids) {
        logger.warn(`${this.clientType}:verifyTorrent,未实现的方法`)
    }
    async setTorrentLocation(ids, location) {
        logger.warn(`${this.clientType}:setTorrentLocation,未实现的方法`)
    }
    async listTorrents() {
        logger.warn(`${this.clientType}:listTorrents,未实现的方法`)
    }

    async getTorrent(id) {
        logger.warn(`${this.clientType}:getTorrent,未实现的方法`)
    }
    
    warpTorrent(torrent) {
        // 统一返回种子格式
        logger.warn(`${this.clientType}:warpTorrent,未实现的方法`)
    }    
}